// 导入路由模块
import VueRouter from 'vue-router'

// 导入tabbar四个页面的路由
import homeContainer from './components/tabbar/homeContainer.vue'
import menberContainer from './components/tabbar/menberContainer.vue'
import shopcarContainer from './components/tabbar/shopcarContainer.vue'
import searchContainer from './components/tabbar/searchContainer.vue'

// 导入新闻列表页面的路由
import newsList from './components/newsList/newsList.vue'
import newInfo from './components/newsList/newInfo.vue'
 

var router = new VueRouter({
    routes: [   //在这里配置路由规则
        {path: '/', redirect: '/home'},
        {path: '/home', component:  homeContainer},
        {path: '/menber', component:  menberContainer},
        {path: '/search', component:  searchContainer},
        {path: '/shopcar', component:  shopcarContainer},
        {path: '/home/newsList', component: newsList},
        {path: '/home/newInfo/:id', component: newInfo}
    ],
    linkActiveClass: 'mui-active'  //覆盖默认的高亮的类

})


// 将路由对象暴露出去，等待主入口调用
export default router